from building import *
Import('asenv')
ARCH=asenv['ARCH']
MODULES=asenv['MODULES']

cwd = GetCurrentDir()

objs = []

objs += SConscript('%s/SConscript'%(ARCH))

if('LWIP' in MODULES):
    if('RTTHREAD' in MODULES):
        objs += Glob('common/lwip/netbios.c')
    else:
        objs += Glob('common/lwip/*.c')
        asenv.Append(CPPPATH=['%s/common/lwip'%(cwd)])

if('SDCARD' in MODULES):
    objs += Glob('common/mcal/sdcard.c')

Return('objs')